import QtQuick 2.0
import QtQuick.Controls 2.3

Item {
    width: 850
    height: 580

    signal qmlSN_sqlWriteFinish()
    onQmlSN_sqlWriteFinish: {
        page_9EO_1lowCurrentA.qmlSN_sqlWriteFinish()
        page_9EO_1lowCurrentB.qmlSN_sqlWriteFinish()
    }

    SwipeView
    {
        id: sv_this
        width:parent.width
        height: parent.height*0.85
        clip: true
        Component.onCompleted:{contentItem.highlightMoveDuration = 0}       //将移动时间设为0

        Page_09EO_1lowCurrentA {
            id: page_9EO_1lowCurrentA
        }
        Page_09EO_1lowCurrentB {
            id: page_9EO_1lowCurrentB
        }

        onCurrentIndexChanged: {
            if(sv_this.currentIndex==0) {button.checked=true;button2.checked=false}
            if(sv_this.currentIndex==1) {button2.checked=true;button.checked=false}
        }

    }

    EXC_Normal_BtnSytle {
        id: button
        nameText: qsTr("A通道")
        width: parent.width*0.13
        height: parent.height*0.11
        checked: true
        anchors.left: parent.left
        anchors.leftMargin: parent.width*0.1
        anchors.topMargin: parent.height/32
        anchors.top: sv_this.bottom
        onClicked: {
            if(sv_this.currentIndex==0) checked = true;
            else sv_this.currentIndex = 0
        }
    }

    EXC_Normal_BtnSytle {
        id: button2
        nameText: qsTr("B通道")
        width: parent.width*0.13
        height: parent.height*0.11
        anchors.left: parent.left
        anchors.leftMargin: parent.width*0.43
        anchors.topMargin: parent.height/32
        anchors.top: sv_this.bottom
        onClicked: {
            if(sv_this.currentIndex==1) checked = true;
            else sv_this.currentIndex = 1
        }
    }

    EXC_Normal_BtnUncheckStyle {
        id: button3
        nameText: qsTr("返回")
        nameFontpixelSize: 30*Math.min(main_screen.width/850, main_screen.height/580)

        width: parent.width*0.13
        height: parent.height*0.11
        anchors.left: parent.left
        anchors.leftMargin: parent.width*0.75
        anchors.topMargin: parent.height/32
        anchors.top: sv_this.bottom
        onClicked: {sw.currentIndex=0}
    }
}
